﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

namespace EXAM.Admin.Page_Admin
{
    public partial class TestPage : System.Web.UI.Page
    {
        string _code = "TESTPAGE";
        string sErr = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BUS.ParametersControl ctr = new BUS.ParametersControl();
                DTO.ParametersInfo inf = ctr.Get(_code, ref sErr);
                RadEditor1.Content = inf.Description;
            }
        }

        protected void RadButton1_Click(object sender, EventArgs e)
        {
            DTO.ParametersInfo inf = new DTO.ParametersInfo();
            inf.Code = _code;
            inf.Description = RadEditor1.Content;
            BUS.ParametersControl ctr = new BUS.ParametersControl();
            sErr = ctr.InsertUpdate(inf);
            if (sErr == "")
            {
                lbErr.Text = "Update successful";
            }
            else lbErr.Text = sErr;
        }
    }
}
